<template>
  <div class="dashboard-wrapper">
    <!-- 上半部分 -->
    <div class="upper-section">
      <!-- 左侧滚动列表 -->
      <div class="left-panel">
      <task-left/>
      </div>


      <div class="center-panel">
        <div class="title">任务数据大屏</div>
        <div class="chart-row">
          <task-scroll/>
        </div>
      </div>

      <!-- 右侧预留区域 -->
      <div class="right-reserve">
          <task-right/>
      </div>
    </div>

    <!-- 下半部分占位 -->
    <div class="lower-section">
      <LineChart/>
    </div>
  </div>
</template>

<script setup>
import TaskScroll  from "../../components/tasksAnalyze/taskScroll.vue";
import LineChart from "../../components/LineCard.vue";
import TaskLeft from "../../components/tasksAnalyze/taskLeft.vue";
import TaskRight from "../../components/tasksAnalyze/taskRight.vue";
</script>

<style scoped lang="less">
.dashboard-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f7fa;
  padding: 20px;
  box-sizing: border-box;
}

/* 上半部分布局 */
.upper-section {
  display: flex;
  height: 420px;
  gap: 20px;
}

/* 左右面板等宽 */
.left-panel,
.right-reserve {
  width: 420px;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  overflow: hidden;
}

/* 中间区域：标题 + 饼图横向排列 */
.center-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.title {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #333;
}

/* 饼图区域左右排列 */
.chart-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex: 1;
  overflow: hidden;
}

.chart-row > * {
  flex: 1;
  height: 100%;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 下半部分占位 */
.lower-section {
  flex: 1;
  margin-top: 30px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 18px;
  font-style: italic;
}
</style>
